/**
 * Description:
 * Class Name:Commandtest
 * Date:2022/2/11 15:14
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第6章_面向对象_下._6_8_Java11增强的lambda表达式._6_8_1_Lambda表达式入门;

import 疯狂Java讲义.第6章_面向对象_下._6_6_接口_经Java9改进.Command;
import 疯狂Java讲义.第6章_面向对象_下._6_6_接口_经Java9改进.ProcessArray;

public class Commandtest {
    public static void main(String[] args) {
        var pa = new ProcessArray();
        int[] target = {3, -4, 6, 4};
        pa.process(target, new Command() {
            @Override
            public void process(int element) {
                System.out.println("数组元素的平方是：" + element * element);
            }
        });
    }
}
